<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //前置自增 先变量自加 后返回表达式
        var a = 10
        ++a
        var b = ++a + 5
        console.log(b);//b= 10 + 1 + 1 + 5 

        var c = 10
        c++//11
        var d = c++ + 10//21
        console.log(d);//21

        var e = 10
        e++//11
        var f = e++ + ++e// e++ =11 e= 11+1  ++e = 13   
        console.log(f);//24
        //后置自增 先表达式返回原值 后面变量在自加1




        var n = 5//n=6
         n++//6
         var n1 = n++ + ++n//n++=6 n=6+1 ++n=7+1
         console.log(n1);//14







         var h = 10// h=11+1
         h++//h=11
         var h1 = h++ + ++h// h++=11 ++h=12+1
         console.log(h1);//24








         var  l = 3//4+1
         l++//4
         var l1 = l++ + ++l// l++=4 ++l= 5 + 1
         console.log(l1);//10

        

    </script>
</head>

<body>

</body>

</html>